#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include "projection.h"
#include "minIni.h"
#include "config.h"
#include "resources.h"
#include "map.h"
#include "spriteanimator.h"
#include "sprite.h"
#include "blitqueue.h"
#include "grcontext.h"
#include "entityaction.h"
#include "entity.h"
#include "entitymanager.h"
#include "inputhandler.h"
#include "controller.h"
#include "player.h"
#include "game.h"

using namespace Oribi;

Player::~Player()
{

}

EntityManager& Player::getEntityManager()
{
    return entityManager;
}

Controller* Player::getController() const
{
    return ctrl;
}

void Player::setController(Controller* ct)
{
    ctrl = ct;
}

void Player::update(Game* g)
{
    entityManager.updateEntities();
    if (ctrl && g)
        ctrl->controlPlayer(*this, g);
}

void Player::drawEverything(GraphicContext& gr)
{
    entityManager.drawEverything(gr);
}
